# encoding: utf-8
'''
Created on 2015-06-07

@author: Emrys

'''
# 使用元祖赋值
p = (5, 6)
x, y = p
print("tuple (5,6):\t", x, ",", y)

# 使用列表赋值
data = ["ACEM", 1, 23, (2013, 12, 3)]
name, shared, price, dateTime = data
print(dateTime)
name, shared, price, (yearTime, monTime, dayTime) = data
print(monTime)

#  除去第一个数据
def dropFirstData(data):
    if len(data) < 2:
        return None
    dropData,*lastData = data
    return lastData

# 保留最后一个数据
def keepLastData(data):
    if len(data) < 2:
        return None
    * dropData, lastData = data
    return lastData

print(dropFirstData(data))
print(keepLastData(data))


